<%@page import="com.zzti.Thired.Employee"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>

<body>
<%-- <form action="EmployeeServlet">
<input type="hidden" name="method" value="Employee">--%>
<table border="1">

<tr>
<td>员工姓名</td>
<td>员工性别</td>
<td>员工年龄</td>
<td>所属部门</td>
<td>所在职务</td>
<td>工龄</td>
<td><a>修改操作</a></td>
<td><a>删除操作</a></td>
</tr>


<% Object list=session.getAttribute("list") ;
if(list!=null){
	List<Employee> el=(List<Employee>)list;
for(int i=0;i<el.size();i++){%>

	<tr id="i">

<th><%= el.get(i).getName()%></th>
<th><%= el.get(i).getSex()%></th>
<th><%=el.get(i).getAge()%></th>
<th><%=el.get(i).getDapartment()%></th>
<th><%=el.get(i).getType()%></th>
<th><%= el.get(i).getYear()%></th>

<th><a href="${pageContext.request.contextPath }/updateEmployee.jsp?id=<%=el.get(i).getName()%>">修改</a></th>

<th><a href="DeleteServlet?Emname=<%=el.get(i).getName()%>">删除</a></th>
<%-- </a>--%>
</tr>
<% }


}else{%>
<p>找不到页面</p>
<%}
%>
<tr><th><a href="${pageContext.request.contextPath }/addEmployee.jsp">新增员工信息</a></th></tr>
</table>
</form>
</body>
</html>